package cn.iocoder.yudao.module.system.dal.mysql.tenant;

import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.yudao.module.system.controller.admin.tenant.vo.callnumber.TenantCallNumberPageReqVO;
import cn.iocoder.yudao.module.system.dal.dataobject.tenant.TenantCallNumberDO;
import org.apache.ibatis.annotations.Mapper;

/**
 * 租户套餐 Mapper
 *
 * @author 芋道源码
 */
@Mapper
public interface TenantCallNumberMapper extends BaseMapperX<TenantCallNumberDO> {

    default PageResult<TenantCallNumberDO> selectPage(TenantCallNumberPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<TenantCallNumberDO>()
                .eqIfPresent(TenantCallNumberDO::getNumberId, reqVO.getNumberId())
                .eqIfPresent(TenantCallNumberDO::getTenantId, reqVO.getTenantId())
                .orderByDesc(TenantCallNumberDO::getId));
    }

//    default List<TenantCallNumberDO> selectList(Long tenantId) {
//        return selectList(TenantCallNumberDO::getTenantId, tenantId);
//    }
}
